package com.hgyc.mom.mes.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.annotation.DictColumn;
import com.hgyc.mom.core.annotation.TableDict;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 显示终端
 * </p>
 *
 * @author fwj
 * @since 2025-06-24
 */
@Data
@TableName("sop_terminal")
@Schema(name="显示终端 对象", description="显示终端 对象")
public class SopTerminal implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "终端ID")
    private Long id;

    @Excel(name = "终端编码")
    @Schema(description = "终端编码")
    private String code;

    @Excel(name = "终端名称")
    @Like
    @Schema(description = "终端名称")
    private String name;

    @Excel(name = "车间ID")
    @EQ
    @Schema(description = "车间ID")
    @TableDict(table = "mes_workshop", key = "id" , columns = {
            @DictColumn(name ="name", alias = "workshopName")
    })
    private Long workshopId;

    @Excel(name = "产线ID")
    @EQ
    @Schema(description = "产线ID")
    @TableDict(table = "mes_workshop", key = "id" , columns = {
            @DictColumn(name ="name", alias = "lineName")
    })
    private Long lineId;

    @Excel(name = "工位ID")
    @EQ
    @Schema(description = "工位ID")
    @TableDict(table = "mes_workshop", key = "id" , columns = {
            @DictColumn(name ="name", alias = "stationName")
    })
    private Long stationId;

    @Excel(name = "终端IP")
    @EQ
    @Schema(description = "终端IP")
    private String ip;

    @Schema(description = "是否报工设备Y|N")
    private String reporting;

    @Excel(name = "状态")
    @EQ
    @Schema(description = "状态")
    private String status;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}